
import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 联系人列表
export function getContactList(params) {
  return request({
    url: host + '/contacts/list',
    method: 'get',
    params
  })
}

// 新增联系人
export function addContact(data) {
  return request({
    url: host + '/contacts/save',
    method: 'post',
    data
  })
}

// 新增联系人
export function updateContact(data) {
  return request({
    url: host + '/contacts/update',
    method: 'post',
    data
  })
}

// 获取联系人
export function getContact(params) {
  return request({
    url: host + '/contacts/detail',
    method: 'get',
    params
  })
}

// 删除联系人
export function deleteContact(data) {
  return request({
    url: host + '/contacts/delete',
    method: 'post',
    data
  })
}

// transferContact
export function transferContact(data) {
  return request({
    url: host + '/contacts/transfer',
    method: 'post',
    data
  })
}

// customer​/dropDown
export function getContactsSelect(params) {
  return request({
    url: host + '/contacts/dropDown',
    method: 'get',
    params
  })
}
